package com.pe1n.yangtaopai.bean;

import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by My on 2016/11/26.
 */

public class CarBottomBean {

    /**
     * status : 200
     * msg : 加载成功
     * data : {"prod_lists":[{"prod_id":"73630","prod_price":87,"image_path":"http://img3.yangtaotop.com/upload/image/20160918/1474163823101799.jpg","purchase_times":""},{"prod_id":"83285","prod_price":33,"image_path":"http://img3.yangtaotop.com/upload/image/20160830/1472524751817798.jpg","purchase_times":""},{"prod_id":"73945","prod_price":47,"image_path":"http://img3.yangtaotop.com/upload/image/20160922/1474523596440386.jpg","purchase_times":""},{"prod_id":"76690","prod_price":52,"image_path":"http://img3.yangtaotop.com/upload/image/20160808/1470649842468393.jpg","purchase_times":""},{"prod_id":"76767","prod_price":26,"image_path":"http://img3.yangtaotop.com/upload/image/20161107/1478511396877819.jpg","purchase_times":""},{"prod_id":"84388","prod_price":45,"image_path":"http://img3.yangtaotop.com/upload/image/20160831/1472635388551097.jpg","purchase_times":""},{"prod_id":"73620","prod_price":123,"image_path":"http://img3.yangtaotop.com/upload/image/20160820/1471672792547042.jpg","purchase_times":""},{"prod_id":"45728","prod_price":42,"image_path":"http://img3.yangtaotop.com/upload/image/20160905/1473069259384374.jpg","purchase_times":""},{"prod_id":"4060","prod_price":50,"image_path":"http://img3.yangtaotop.com/upload/image/20161011/1476154155677456.jpg","purchase_times":""},{"prod_id":"16500","prod_price":43,"image_path":"http://img3.yangtaotop.com/upload/image/20160905/1473063724568905.jpg","purchase_times":""},{"prod_id":"60198","prod_price":107,"image_path":"http://img3.yangtaotop.com/upload/image/20160812/1470985619189748.jpg","purchase_times":""},{"prod_id":"6273","prod_price":48,"image_path":"http://img3.yangtaotop.com/upload/image/20160523/1463991107971837.jpg","purchase_times":""},{"prod_id":"83213","prod_price":66,"image_path":"http://img3.yangtaotop.com/upload/image/20160829/1472440647949761.jpg","purchase_times":""},{"prod_id":"79158","prod_price":36,"image_path":"http://img3.yangtaotop.com/upload/image/20160811/1470881283180434.jpg","purchase_times":""},{"prod_id":"4147","prod_price":101,"image_path":"http://img3.yangtaotop.com/upload/image/20160907/1473243866154400.jpg","purchase_times":""},{"prod_id":"5548","prod_price":116,"image_path":"http://img3.yangtaotop.com/upload/image/20160905/1473071318785674.jpg","purchase_times":""},{"prod_id":"6851","prod_price":67,"image_path":"http://img3.yangtaotop.com/upload/image/20160408/1460102088144326.jpg","purchase_times":""},{"prod_id":"2421","prod_price":113,"image_path":"http://img3.yangtaotop.com/upload/image/20160912/1473668410542914.jpg","purchase_times":""},{"prod_id":"84360","prod_price":24,"image_path":"http://img3.yangtaotop.com/upload/image/20160831/1472622608829578.jpg","purchase_times":""},{"prod_id":"84347","prod_price":47,"image_path":"http://img3.yangtaotop.com/upload/image/20160831/1472608601441743.jpg","purchase_times":""},{"prod_id":"1770","prod_price":67,"image_path":"http://img3.yangtaotop.com/upload/image/20160907/1473229598190008.jpg","purchase_times":""},{"prod_id":"1656","prod_price":46,"image_path":"http://img3.yangtaotop.com/upload/image/20160913/1473736304389763.jpg","purchase_times":""},{"prod_id":"7539","prod_price":166,"image_path":"http://img3.yangtaotop.com/upload/image/20160905/1473060554850805.jpg","purchase_times":""},{"prod_id":"8147","prod_price":43,"image_path":"http://img3.yangtaotop.com/upload/image/20160826/1472194797629143.jpg","purchase_times":""},{"prod_id":"81025","prod_price":46,"image_path":"http://img3.yangtaotop.com/upload/P800/a8cb5b75-2ccb-45ed-bb7d-18da4a690006.jpg","purchase_times":""},{"prod_id":"10114","prod_price":148,"image_path":"http://img3.yangtaotop.com/upload/image/20160716/1468653598665813.jpg","purchase_times":""},{"prod_id":"91469","prod_price":130,"image_path":"http://img3.yangtaotop.com/upload/image/20160808/1470621019583648.jpg","purchase_times":""},{"prod_id":"5009","prod_price":101,"image_path":"http://img3.yangtaotop.com/upload/image/20160518/1463560215437342.jpg","purchase_times":""},{"prod_id":"4060","prod_price":50,"image_path":"http://img3.yangtaotop.com/upload/image/20161011/1476154155677456.jpg","purchase_times":""},{"prod_id":"18567","prod_price":56,"image_path":"http://img3.yangtaotop.com/upload/image/20161121/1479697069948887.jpg","purchase_times":""},{"prod_id":"1722","prod_price":35,"image_path":"http://img3.yangtaotop.com/upload/image/20160912/1473667906511700.jpg","purchase_times":""}],"jg_title":"下单最多"}
     */

    @SerializedName("status")
    private int status;
    @SerializedName("msg")
    private String msg;
    @SerializedName("data")
    private DataData data;

    public static CarBottomBean objectFromData(String str) {

        return new Gson().fromJson(str, CarBottomBean.class);
    }

    public static List<CarBottomBean> arrayCarBottomBeanFromData(String str) {

        Type listType = new TypeToken<ArrayList<CarBottomBean>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public DataData getData() {
        return data;
    }

    public void setData(DataData data) {
        this.data = data;
    }

    public static class DataData {
        /**
         * prod_lists : [{"prod_id":"73630","prod_price":87,"image_path":"http://img3.yangtaotop.com/upload/image/20160918/1474163823101799.jpg","purchase_times":""},{"prod_id":"83285","prod_price":33,"image_path":"http://img3.yangtaotop.com/upload/image/20160830/1472524751817798.jpg","purchase_times":""},{"prod_id":"73945","prod_price":47,"image_path":"http://img3.yangtaotop.com/upload/image/20160922/1474523596440386.jpg","purchase_times":""},{"prod_id":"76690","prod_price":52,"image_path":"http://img3.yangtaotop.com/upload/image/20160808/1470649842468393.jpg","purchase_times":""},{"prod_id":"76767","prod_price":26,"image_path":"http://img3.yangtaotop.com/upload/image/20161107/1478511396877819.jpg","purchase_times":""},{"prod_id":"84388","prod_price":45,"image_path":"http://img3.yangtaotop.com/upload/image/20160831/1472635388551097.jpg","purchase_times":""},{"prod_id":"73620","prod_price":123,"image_path":"http://img3.yangtaotop.com/upload/image/20160820/1471672792547042.jpg","purchase_times":""},{"prod_id":"45728","prod_price":42,"image_path":"http://img3.yangtaotop.com/upload/image/20160905/1473069259384374.jpg","purchase_times":""},{"prod_id":"4060","prod_price":50,"image_path":"http://img3.yangtaotop.com/upload/image/20161011/1476154155677456.jpg","purchase_times":""},{"prod_id":"16500","prod_price":43,"image_path":"http://img3.yangtaotop.com/upload/image/20160905/1473063724568905.jpg","purchase_times":""},{"prod_id":"60198","prod_price":107,"image_path":"http://img3.yangtaotop.com/upload/image/20160812/1470985619189748.jpg","purchase_times":""},{"prod_id":"6273","prod_price":48,"image_path":"http://img3.yangtaotop.com/upload/image/20160523/1463991107971837.jpg","purchase_times":""},{"prod_id":"83213","prod_price":66,"image_path":"http://img3.yangtaotop.com/upload/image/20160829/1472440647949761.jpg","purchase_times":""},{"prod_id":"79158","prod_price":36,"image_path":"http://img3.yangtaotop.com/upload/image/20160811/1470881283180434.jpg","purchase_times":""},{"prod_id":"4147","prod_price":101,"image_path":"http://img3.yangtaotop.com/upload/image/20160907/1473243866154400.jpg","purchase_times":""},{"prod_id":"5548","prod_price":116,"image_path":"http://img3.yangtaotop.com/upload/image/20160905/1473071318785674.jpg","purchase_times":""},{"prod_id":"6851","prod_price":67,"image_path":"http://img3.yangtaotop.com/upload/image/20160408/1460102088144326.jpg","purchase_times":""},{"prod_id":"2421","prod_price":113,"image_path":"http://img3.yangtaotop.com/upload/image/20160912/1473668410542914.jpg","purchase_times":""},{"prod_id":"84360","prod_price":24,"image_path":"http://img3.yangtaotop.com/upload/image/20160831/1472622608829578.jpg","purchase_times":""},{"prod_id":"84347","prod_price":47,"image_path":"http://img3.yangtaotop.com/upload/image/20160831/1472608601441743.jpg","purchase_times":""},{"prod_id":"1770","prod_price":67,"image_path":"http://img3.yangtaotop.com/upload/image/20160907/1473229598190008.jpg","purchase_times":""},{"prod_id":"1656","prod_price":46,"image_path":"http://img3.yangtaotop.com/upload/image/20160913/1473736304389763.jpg","purchase_times":""},{"prod_id":"7539","prod_price":166,"image_path":"http://img3.yangtaotop.com/upload/image/20160905/1473060554850805.jpg","purchase_times":""},{"prod_id":"8147","prod_price":43,"image_path":"http://img3.yangtaotop.com/upload/image/20160826/1472194797629143.jpg","purchase_times":""},{"prod_id":"81025","prod_price":46,"image_path":"http://img3.yangtaotop.com/upload/P800/a8cb5b75-2ccb-45ed-bb7d-18da4a690006.jpg","purchase_times":""},{"prod_id":"10114","prod_price":148,"image_path":"http://img3.yangtaotop.com/upload/image/20160716/1468653598665813.jpg","purchase_times":""},{"prod_id":"91469","prod_price":130,"image_path":"http://img3.yangtaotop.com/upload/image/20160808/1470621019583648.jpg","purchase_times":""},{"prod_id":"5009","prod_price":101,"image_path":"http://img3.yangtaotop.com/upload/image/20160518/1463560215437342.jpg","purchase_times":""},{"prod_id":"4060","prod_price":50,"image_path":"http://img3.yangtaotop.com/upload/image/20161011/1476154155677456.jpg","purchase_times":""},{"prod_id":"18567","prod_price":56,"image_path":"http://img3.yangtaotop.com/upload/image/20161121/1479697069948887.jpg","purchase_times":""},{"prod_id":"1722","prod_price":35,"image_path":"http://img3.yangtaotop.com/upload/image/20160912/1473667906511700.jpg","purchase_times":""}]
         * jg_title : 下单最多
         */

        @SerializedName("jg_title")
        private String jgTitle;
        @SerializedName("prod_lists")
        private List<ProdListsData> prodLists;

        public static DataData objectFromData(String str) {

            return new Gson().fromJson(str, DataData.class);
        }

        public static List<DataData> arrayDataDataFromData(String str) {

            Type listType = new TypeToken<ArrayList<DataData>>() {
            }.getType();

            return new Gson().fromJson(str, listType);
        }

        public String getJgTitle() {
            return jgTitle;
        }

        public void setJgTitle(String jgTitle) {
            this.jgTitle = jgTitle;
        }

        public List<ProdListsData> getProdLists() {
            return prodLists;
        }

        public void setProdLists(List<ProdListsData> prodLists) {
            this.prodLists = prodLists;
        }

        public static class ProdListsData {
            /**
             * prod_id : 73630
             * prod_price : 87
             * image_path : http://img3.yangtaotop.com/upload/image/20160918/1474163823101799.jpg
             * purchase_times :
             */

            @SerializedName("prod_id")
            private String prodId;
            @SerializedName("prod_price")
            private int prodPrice;
            @SerializedName("image_path")
            private String imagePath;
            @SerializedName("purchase_times")
            private String purchaseTimes;

            public static ProdListsData objectFromData(String str) {

                return new Gson().fromJson(str, ProdListsData.class);
            }

            public static List<ProdListsData> arrayProdListsDataFromData(String str) {

                Type listType = new TypeToken<ArrayList<ProdListsData>>() {
                }.getType();

                return new Gson().fromJson(str, listType);
            }

            public String getProdId() {
                return prodId;
            }

            public void setProdId(String prodId) {
                this.prodId = prodId;
            }

            public int getProdPrice() {
                return prodPrice;
            }

            public void setProdPrice(int prodPrice) {
                this.prodPrice = prodPrice;
            }

            public String getImagePath() {
                return imagePath;
            }

            public void setImagePath(String imagePath) {
                this.imagePath = imagePath;
            }

            public String getPurchaseTimes() {
                return purchaseTimes;
            }

            public void setPurchaseTimes(String purchaseTimes) {
                this.purchaseTimes = purchaseTimes;
            }
        }
    }
}
